package com.question_barrier.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
/**
 * 关卡表实体
 */
@Data
@Entity
@Table(name = "barrier")
public class Barrier {
    @Id
    private long id;
    @Column(name = "grade")
    private String grade;
    @Column(name = "subject")
    private String subject;
    @Column(name = "difficulty")
    private String difficulty;
    @Column(name = "degree")
    private long degree;
    @Column(name = "question_quantity")
    private long questionQuantity;
    @Column(name = "limited_time")
    private long limitedTime;
    @Column(name = "create_at")
    private Date createAt;
    @Column(name = "create_by")
    private long createBy;
    @Column(name = "update_at")
    private Date updateAt;
    @Column(name = "update_by")
    private long updateBy;
    @Column(name = "is_del")
    private byte isDel;
    public  Barrier(){
    }

    public Barrier(long id, String grade, String subject, String difficulty, long degree, long questionQuantity, long limitedTime, Date createAt, long createBy, Date updateAt, long updateBy, byte isDel) {
        this.id = id;
        this.grade = grade;
        this.subject = subject;
        this.degree = degree;
        this.difficulty = difficulty;
        this.questionQuantity = questionQuantity;
        this.limitedTime = limitedTime;
        this.createAt = createAt;
        this.createBy = createBy;
        this.updateAt = updateAt;
        this.updateBy = updateBy;
        this.isDel = isDel;
    }

    @Override
    public String toString() {
        return "Barrier{" +
                "id=" + id +
                ", grade='" + grade + '\'' +
                ", subject='" + subject + '\'' +
                ", difficulty='" + difficulty + '\'' +
                ", degree=" + degree +
                ", questionQuantity=" + questionQuantity +
                ", limitedTime=" + limitedTime +
                ", createAt=" + createAt +
                ", createBy=" + createBy +
                ", updateAt=" + updateAt +
                ", updateBy=" + updateBy +
                ", isDel=" + isDel +
                '}';
    }
}
